﻿using System;

namespace IntoNails.Infrastructure.InteractionRequests
{
    public class RequestRaisedEventArgs<T> : EventArgs
    {
        public RequestRaisedEventArgs(T entity, Action<T> callback, Action cancelCallback)
        {
            this.CancelCallback = cancelCallback;
            this.Callback = callback;
            this.Entity = entity;
        }

        public RequestRaisedEventArgs(T entity, object state, Action<T> callback, Action cancelCallback)
            : this(entity, callback, cancelCallback)
        {
            this.ObjectState = state;
        }

        public Action CancelCallback { get; private set; }
        public Action<T> Callback { get; private set; }
        public T Entity { get; private set; }
        public object ObjectState { get; private set; }
    }
}
